package controllers

import (
	"strconv"

	beego "github.com/beego/beego/v2/server/web"
)

type TeacherController struct {
	beego.Controller
}

// Post ...
// @Title 点名
// @Description 老师点名
// @Param	xuexiao		path 	string	true		"学校"
// @Param	xueyuan		path 	string	true		"学院"
// @Param	mima		query 	string	true		"密码"
// @Param	sex		query 	string	true		"性别"
// @Param	age		query 	int	true		"年龄"
// @Success 201 {int} delete success!
// @Failure 403 id is empty
// @router /dianming/:xuexiao/:xueyuan [get]
func (c *TeacherController) DianMing() {
	//1.接收参数
	xuexiaoStr := c.Ctx.Input.Param(":xuexiao")
	xueyuanStr := c.Ctx.Input.Param(":xueyuan")
	mimastr := c.GetString("mima")
	sexstr := c.GetString("sex")
	age, _ := c.GetInt("age")

	//2. 调用业务逻辑

	//3.输出结果
	c.Data["json"] = "学校是：" + xuexiaoStr + "学院是：" + xueyuanStr + "密码是：" + mimastr + "性别是：" + sexstr + "年龄是：" + strconv.Itoa(age)
	c.ServeJSON()
}

// Post ...
// @Title 阅卷
// @Description 老师阅卷
// @Param	xuexiao		path 	string	true		"学校"
// @Param	xueyuan		path 	string	true		"学院"
// @Param	zhuanye		path 	string	true		"专业"
// @Param	sn		path 	string	true		"学号"
// @Success 201 {int} delete success!
// @Failure 403 id is empty
// @router /:yuejuan [post]
func (t *TeacherController) YueJuan() {

}
